package com.example.demo.ascyn.util;

import com.example.demo.ascyn.threadpool.ThreadTaskPoolConfig;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * Created by yijy on 2017/8/19.
 */
public class Main {
    public static void main(String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(ThreadTaskPoolConfig.class);

        AsyncTask asyncTaskService = context.getBean(AsyncTask.class);
        for (int i=0;i<30;i++){
            asyncTaskService.say(i);
            asyncTaskService.sayHello(i);
        }
        System.out.println("end!!!!!");
        System.out.println("All end!!!!!");
    }
}
